package com.yungu.swift.system.marketing.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.yungu.swift.base.ResponseData;
import com.yungu.swift.base.mapper.IMapper;
import com.yungu.swift.base.service.impl.BaseServiceImpl;
import com.yungu.swift.system.marketing.dao.MarketingInviteLogMapper;
import com.yungu.swift.system.marketing.model.dto.MarketingInviteLogDto;
import com.yungu.swift.system.marketing.service.MarketingInviteLogService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;


/**
 * Copyright © 厦门云谷信息科技有限公司 2018-2020 All Right Reserved
 * <p>
 * 司机邀请日志业务逻辑接口实现类
 *
 * @version 1.1.0-SNAPSHOT
 * @since 2018-07-05 16:23
 */
@Service
public class MarketingInviteLogServiceImpl extends BaseServiceImpl<MarketingInviteLogDto> implements MarketingInviteLogService {

    @Autowired
    private MarketingInviteLogMapper marketingInviteLogMapper;

    @Override
    protected IMapper<MarketingInviteLogDto> getMapper() {
        return marketingInviteLogMapper;
    }

    /**
     * 获取邀请并审核通过的司机列表
     *
     * @param inviter
     * @return
     */
    @Override
    public ResponseData<List<Map<String, Object>>> listInviteDriver(String inviter) {
        return ResponseData.buildSuccessResponse(marketingInviteLogMapper.listInviteDriver(inviter));
    }
}